<link href="http://localhost/citest/css/style.css" rel="stylesheet" type="text/css"/>
<?php $this->load->view("includes/header")?>
<?php $this->load->view("includes/sidebar-admin")?>
<?php $this->load->view("includes/sidebar-b")?>

<div id="content">
<h2>Manage Categories</h2>
<table>
	<thead>
		<tr>
			<th>Pages</th>
			<th>Posted by</th>
            <th>Edit</th>
            <th>Delete</th>
		</tr> 
	</thead>
	<tbody>
        <?php
            foreach ($categories as $cats){
              ?>
            <?php?>
                <tr>
                    <td> <?php echo $cats['cat_name']?></td>
                    <td> <?php echo $cats['user_id']?></td>
                    <td><a class = 'edit' href ='../c_categories/edit?cat=<?php echo $cats['cat_id']?>'>Edit</a></td>
                    <td><a class = 'delete' onclick="return confirm('Are you sure?')" href ='../c_categories/delete?cat=<?php echo $cats['cat_id']?>'>Delete</td>
                </tr>
               <?php
            }
        ?>
        
        
	</tbody>
</table>
</div><!--end content-->
<?php $this->load->view("includes/footer")?>